From 503f1282452764858a80847dfd0c1488cfc4de40 Mon Sep 17 00:00:00 2001 From: Jimi Xenidis Date: Tue, 28 Nov 2006 19:01:46 -0500 Subject: [PATCH] [XEN][POWERPC] cleanup hard tabs allowed in some files in order to track linux lineage Signed-off-by: Jimi Xenidis Signed-off-by: Hollis Blanchard --- xen/arch/powerpc/bitops.c | 124 +++++++++++++------------- xen/arch/powerpc/external.c | 2 +- xen/arch/powerpc/memory.c | 10 +-- xen/arch/powerpc/of-devtree.h | 34 +++---- xen/arch/powerpc/of_handler/console.c | 12 +-- xen/arch/powerpc/papr/xlate.c | 2 +- xen/arch/powerpc/rtas.c | 14 +-- xen/arch/powerpc/shadow.c | 4 +- xen/arch/powerpc/smp.c | 10 +-- 9 files changed, 106 insertions(+), 106 deletions(-) diff --git a/xen/arch/powerpc/bitops.c b/xen/arch/powerpc/bitops.c index 1b731a9b66..02a53384b1 100644 --- a/xen/arch/powerpc/bitops.c +++ b/xen/arch/powerpc/bitops.c @@ -12,42 +12,42 @@ * @size: The maximum size to search */ unsigned long find_next_bit(const unsigned long *addr, unsigned long size, - unsigned long offset) + unsigned long offset) { - const unsigned long *p = addr + BITOP_WORD(offset); - unsigned long result = offset & ~(BITS_PER_LONG-1); - unsigned long tmp; + const unsigned long *p = addr + BITOP_WORD(offset); + unsigned long result = offset & ~(BITS_PER_LONG-1); + unsigned long tmp; - if (offset >= size) - return size; - size -= result; - offset %= BITS_PER_LONG; - if (offset) { - tmp = *(p++); - tmp &= (~0UL << offset); - if (size < BITS_PER_LONG) - goto found_first; - if (tmp) - goto found_middle; - size -= BITS_PER_LONG; - result += BITS_PER_LONG; - } - while (size & ~(BITS_PER_LONG-1)) { - if ((tmp = *(p++))) - goto found_middle; - result += BITS_PER_LONG; - size -= BITS_PER_LONG; - } - if (!size) - return result; - tmp = *p; + if (offset >= size) + return size; + size -= result; + offset %= BITS_PER_LONG; + if (offset) { + tmp = *(p++); + tmp &= (~0UL << offset); + if (size < BITS_PER_LONG) + goto found_first; + if (tmp) + goto found_middle; + size -= BITS_PER_LONG; + result += BITS_PER_LONG; + } + while (size & ~(BITS_PER_LONG-1)) { + if ((tmp = *(p++))) + goto found_middle; + result += BITS_PER_LONG; + size -= BITS_PER_LONG; + } + if (!size) + return result; + tmp = *p; found_first: - tmp &= (~0UL >> (BITS_PER_LONG - size)); - if (tmp == 0UL) /* Are any bits set? */ - return result + size; /* Nope. */ + tmp &= (~0UL >> (BITS_PER_LONG - size)); + if (tmp == 0UL) /* Are any bits set? */ + return result + size; /* Nope. */ found_middle: - return result + __ffs(tmp); + return result + __ffs(tmp); } /* @@ -55,40 +55,40 @@ found_middle: * Linus' asm-alpha/bitops.h. */ unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long size, - unsigned long offset) + unsigned long offset) { - const unsigned long *p = addr + BITOP_WORD(offset); - unsigned long result = offset & ~(BITS_PER_LONG-1); - unsigned long tmp; + const unsigned long *p = addr + BITOP_WORD(offset); + unsigned long result = offset & ~(BITS_PER_LONG-1); + unsigned long tmp; - if (offset >= size) - return size; - size -= result; - offset %= BITS_PER_LONG; - if (offset) { - tmp = *(p++); - tmp |= ~0UL >> (BITS_PER_LONG - offset); - if (size < BITS_PER_LONG) - goto found_first; - if (~tmp) - goto found_middle; - size -= BITS_PER_LONG; - result += BITS_PER_LONG; - } - while (size & ~(BITS_PER_LONG-1)) { - if (~(tmp = *(p++))) - goto found_middle; - result += BITS_PER_LONG; - size -= BITS_PER_LONG; - } - if (!size) - return result; - tmp = *p; + if (offset >= size) + return size; + size -= result; + offset %= BITS_PER_LONG; + if (offset) { + tmp = *(p++); + tmp |= ~0UL >> (BITS_PER_LONG - offset); + if (size < BITS_PER_LONG) + goto found_first; + if (~tmp) + goto found_middle; + size -= BITS_PER_LONG; + result += BITS_PER_LONG; + } + while (size & ~(BITS_PER_LONG-1)) { + if (~(tmp = *(p++))) + goto found_middle; + result += BITS_PER_LONG; + size -= BITS_PER_LONG; + } + if (!size) + return result; + tmp = *p; found_first: - tmp |= ~0UL << size; - if (tmp == ~0UL) /* Are any bits zero? */ - return result + size; /* Nope. */ + tmp |= ~0UL << size; + if (tmp == ~0UL) /* Are any bits zero? */ + return result + size; /* Nope. */ found_middle: - return result + ffz(tmp); + return result + ffz(tmp); } diff --git a/xen/arch/powerpc/external.c b/xen/arch/powerpc/external.c index 59d0904bf1..135f808fdc 100644 --- a/xen/arch/powerpc/external.c +++ b/xen/arch/powerpc/external.c @@ -83,7 +83,7 @@ void do_external(struct cpu_user_regs *regs) vec = xen_mpic_get_irq(regs); if (irq_desc[vec].status & IRQ_PER_CPU) { - /* x86 do_IRQ does not respect the per cpu flag. */ + /* x86 do_IRQ does not respect the per cpu flag. */ irq_desc_t *desc = &irq_desc[vec]; regs->entry_vector = vec; desc->handler->ack(vec); diff --git a/xen/arch/powerpc/memory.c b/xen/arch/powerpc/memory.c index b9928e5e60..44739acdae 100644 --- a/xen/arch/powerpc/memory.c +++ b/xen/arch/powerpc/memory.c @@ -98,11 +98,11 @@ static void heap_init(struct membuf *mb, uint entries) ulong start_blk; ulong end_blk = 0; - for (i = 0; i < entries; i++) { - start_blk = mb[i].start; - end_blk = start_blk + mb[i].size; + for (i = 0; i < entries; i++) { + start_blk = mb[i].start; + end_blk = start_blk + mb[i].size; - if (start_blk < xenheap_phys_end) { + if (start_blk < xenheap_phys_end) { if (xenheap_phys_end > end_blk) { panic("xenheap spans LMB\n"); } @@ -114,7 +114,7 @@ static void heap_init(struct membuf *mb, uint entries) init_boot_pages(start_blk, end_blk); total_pages += (end_blk - start_blk) >> PAGE_SHIFT; - } + } } static void ofd_walk_mem(void *m, walk_mem_fn fn) diff --git a/xen/arch/powerpc/of-devtree.h b/xen/arch/powerpc/of-devtree.h index 8797b5d2e9..60e6a50c63 100644 --- a/xen/arch/powerpc/of-devtree.h +++ b/xen/arch/powerpc/of-devtree.h @@ -33,15 +33,15 @@ enum { union of_pci_hi { u32 word; struct { - u32 opa_n: 1; /* relocatable */ - u32 opa_p: 1; /* prefetchable */ - u32 opa_t: 1; /* aliased */ + u32 opa_n: 1; /* relocatable */ + u32 opa_p: 1; /* prefetchable */ + u32 opa_t: 1; /* aliased */ u32 _opa_res: 3; - u32 opa: 2; /* space code */ + u32 opa: 2; /* space code */ u32 opa_b: 8; /* bus number */ - u32 opa_d: 5; /* device number */ - u32 opa_f: 3; /* function number */ - u32 opa_r: 8; /* register number */ + u32 opa_d: 5; /* device number */ + u32 opa_f: 3; /* function number */ + u32 opa_r: 8; /* register number */ } bits; }; @@ -79,9 +79,9 @@ struct reg_property32 { typedef s32 ofdn_t; #define OFD_ROOT 1 -#define OFD_DUMP_NAMES 0x1 -#define OFD_DUMP_VALUES 0x2 -#define OFD_DUMP_ALL (OFD_DUMP_VALUES|OFD_DUMP_NAMES) +#define OFD_DUMP_NAMES 0x1 +#define OFD_DUMP_VALUES 0x2 +#define OFD_DUMP_ALL (OFD_DUMP_VALUES|OFD_DUMP_NAMES) extern void *ofd_create(void *mem, size_t sz); extern ofdn_t ofd_node_parent(void *mem, ofdn_t n); @@ -90,9 +90,9 @@ extern ofdn_t ofd_node_child(void *mem, ofdn_t p); extern const char *ofd_node_path(void *mem, ofdn_t p); extern int ofd_node_to_path(void *mem, ofdn_t p, void *buf, size_t sz); extern ofdn_t ofd_node_child_create(void *mem, ofdn_t parent, - const char *path, size_t pathlen); + const char *path, size_t pathlen); extern ofdn_t ofd_node_peer_create(void *mem, ofdn_t sibling, - const char *path, size_t pathlen); + const char *path, size_t pathlen); extern ofdn_t ofd_node_find(void *mem, const char *devspec); extern ofdn_t ofd_node_add(void *m, ofdn_t n, const char *path, size_t sz); extern int ofd_node_prune(void *m, ofdn_t n); @@ -102,14 +102,14 @@ extern ofdn_t ofd_node_io(void *mem, ofdn_t n); extern ofdn_t ofd_nextprop(void *mem, ofdn_t n, const char *prev, char *name); extern ofdn_t ofd_prop_find(void *mem, ofdn_t n, const char *name); extern int ofd_getprop(void *mem, ofdn_t n, const char *name, - void *buf, size_t sz); + void *buf, size_t sz); extern int ofd_getproplen(void *mem, ofdn_t n, const char *name); extern int ofd_setprop(void *mem, ofdn_t n, const char *name, - const void *buf, size_t sz); + const void *buf, size_t sz); extern void ofd_prop_remove(void *mem, ofdn_t node, ofdn_t prop); extern ofdn_t ofd_prop_add(void *mem, ofdn_t n, const char *name, - const void *buf, size_t sz); + const void *buf, size_t sz); extern ofdn_t ofd_io_create(void *m, ofdn_t node, u64 open); extern u32 ofd_io_open(void *mem, ofdn_t n); extern void ofd_io_close(void *mem, ofdn_t n); @@ -129,10 +129,10 @@ extern size_t ofd_size(void *mem); extern size_t ofd_space(void *mem); extern void ofd_prop_print(const char *head, const char *path, - const char *name, const char *prop, size_t sz); + const char *name, const char *prop, size_t sz); extern ofdn_t ofd_node_find_by_prop(void *mem, ofdn_t n, const char *name, - const void *val, size_t sz); + const void *val, size_t sz); extern ofdn_t ofd_node_find_next(void *mem, ofdn_t n); extern ofdn_t ofd_node_find_prev(void *mem, ofdn_t n); extern void ofd_init(int (*write)(const char *, size_t len)); diff --git a/xen/arch/powerpc/of_handler/console.c b/xen/arch/powerpc/of_handler/console.c index 798f028a66..1c576ef3c2 100644 --- a/xen/arch/powerpc/of_handler/console.c +++ b/xen/arch/powerpc/of_handler/console.c @@ -113,7 +113,7 @@ static s32 ofh_xen_dom0_read(s32 chan, void *buf, u32 count, s32 *actual, return ret; rc = xen_hvcall(XEN_MARK(__HYPERVISOR_console_io), CONSOLEIO_read, - count, desc); + count, desc); if (rc <= 0) { return ret; } @@ -139,7 +139,7 @@ static s32 ofh_xen_dom0_write(s32 chan, const void *buf, u32 count, return ret; rc = xen_hvcall(XEN_MARK(__HYPERVISOR_console_io), CONSOLEIO_write, - count, desc); + count, desc); if (rc <= 0) { return ret; } @@ -157,8 +157,8 @@ static s32 ofh_xen_dom0_write(s32 chan, const void *buf, u32 count, static s32 ofh_xen_domu_read(s32 chan, void *buf, u32 count, s32 *actual, ulong b) { - struct xencons_interface *intf; - XENCONS_RING_IDX cons, prod; + struct xencons_interface *intf; + XENCONS_RING_IDX cons, prod; s32 ret; intf = DRELA(ofh_ihp, b)->ofi_intf; @@ -180,8 +180,8 @@ static s32 ofh_xen_domu_read(s32 chan, void *buf, u32 count, s32 *actual, static s32 ofh_xen_domu_write(s32 chan, const void *buf, u32 count, s32 *actual, ulong b) { - struct xencons_interface *intf; - XENCONS_RING_IDX cons, prod; + struct xencons_interface *intf; + XENCONS_RING_IDX cons, prod; s32 ret; intf = DRELA(ofh_ihp, b)->ofi_intf; diff --git a/xen/arch/powerpc/papr/xlate.c b/xen/arch/powerpc/papr/xlate.c index 2d29d5819c..2b7390d252 100644 --- a/xen/arch/powerpc/papr/xlate.c +++ b/xen/arch/powerpc/papr/xlate.c @@ -570,7 +570,7 @@ static void h_read(struct cpu_user_regs *regs) struct domain_htab *htab = &d->arch.htab; union pte volatile *pte; - if (flags & H_READ_4) + if (flags & H_READ_4) ptex &= ~0x3UL; if (ptex > (1UL << htab->log_num_ptes)) { diff --git a/xen/arch/powerpc/rtas.c b/xen/arch/powerpc/rtas.c index 3ffe34a606..6b1451eff3 100644 --- a/xen/arch/powerpc/rtas.c +++ b/xen/arch/powerpc/rtas.c @@ -33,10 +33,10 @@ unsigned long rtas_base; unsigned long rtas_end; struct rtas_args { - int ra_token; - int ra_nargs; - int ra_nrets; - int ra_args[10]; + int ra_token; + int ra_nargs; + int ra_nrets; + int ra_args[10]; } __attribute__ ((aligned(8))); static int rtas_call(struct rtas_args *r) @@ -44,13 +44,13 @@ static int rtas_call(struct rtas_args *r) if (rtas_entry == 0) return -ENOSYS; - return prom_call(r, rtas_base, rtas_entry, rtas_msr); + return prom_call(r, rtas_base, rtas_entry, rtas_msr); } int __init rtas_init(void *m) { static const char halt[] = "power-off"; - static const char reboot[] = "system-reboot"; + static const char reboot[] = "system-reboot"; ofdn_t n; if (rtas_entry == 0) @@ -89,7 +89,7 @@ rtas_reboot(void) { struct rtas_args r; - if (rtas_reboot_token == -1) + if (rtas_reboot_token == -1) return -ENOSYS; r.ra_token = rtas_reboot_token; diff --git a/xen/arch/powerpc/shadow.c b/xen/arch/powerpc/shadow.c index 3d33433c0f..ed09b18461 100644 --- a/xen/arch/powerpc/shadow.c +++ b/xen/arch/powerpc/shadow.c @@ -115,8 +115,8 @@ unsigned int shadow_set_allocation(struct domain *d, } int shadow_domctl(struct domain *d, - xen_domctl_shadow_op_t *sc, - XEN_GUEST_HANDLE(xen_domctl_t) u_domctl) + xen_domctl_shadow_op_t *sc, + XEN_GUEST_HANDLE(xen_domctl_t) u_domctl) { if ( unlikely(d == current->domain) ) { diff --git a/xen/arch/powerpc/smp.c b/xen/arch/powerpc/smp.c index 4fb58afaef..57f2186df5 100644 --- a/xen/arch/powerpc/smp.c +++ b/xen/arch/powerpc/smp.c @@ -109,7 +109,7 @@ int on_selected_cpus( if (NOW() > start + stall) { printk("IPI start stall: %d ACKS to %d SYNS\n", atomic_read(&call_data.started), nr_cpus); - start = NOW(); + start = NOW(); } } @@ -172,9 +172,9 @@ void smp_message_recv(int msg, struct cpu_user_regs *regs) static void debug_ipi_ack(void *info) { if (info) { - unsigned long start, stall = SECONDS(5); - for (start = NOW(); NOW() < start + stall; ); - printk("IPI recv on cpu #%d: %s\n", smp_processor_id(), (char *)info); + unsigned long start, stall = SECONDS(5); + for (start = NOW(); NOW() < start + stall; ); + printk("IPI recv on cpu #%d: %s\n", smp_processor_id(), (char *)info); } return; } @@ -207,7 +207,7 @@ void ipi_torture_test(void) mean = tb_to_ns(sum / trials); printk("IPI latency: min = %ld ticks, max = %ld ticks, mean = %ldns\n", - min, max, mean); + min, max, mean); smp_call_function(debug_ipi_ack, "Hi", 0, 1); } -- 2.30.2